import Vue from "vue";
import Vuex from "vuex";
import theme from "./modules/theme";
import user from "./modules/user";

Vue.use(Vuex);

export default new Vuex.Store({
  modules: {
    theme,
    user,
  },
  state: {
    // user: null,
  },
  mutations: {
    // setUser(state, user) {
    //   state.user = user;
    // },
  },
  actions: {
    // login({ commit }, user) {
    //   // 模拟登录
    //   commit("setUser", user);
    // },
    // logout({ commit }) {
    //   commit("setUser", null);
    // },
  },
  getters: {
    // isAuthenticated: (state) => !!state.user,
  },
});
